package com.wnhz.mayabunny.fragment;

import com.wnhz.mayabunny.R;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;

public class Myself_initialise extends Fragment {
	int a = 0;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		TextView employer_textview;
		// TODO Auto-generated method stub
		View view = inflater.inflate(R.layout.fragment_setmyself, container, false);
		employer_textview = (TextView) view.findViewById(R.id.employer);
		employer_textview.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				if (a == 0) {
					FragmentManager fragmentManager = getChildFragmentManager();
					FragmentTransaction transaction = fragmentManager.beginTransaction();
					transaction.replace(R.id.wokao1, new Myself());
					transaction.commit();
					a++;
				} else {
					FragmentManager fragmentManager = getChildFragmentManager();
					FragmentTransaction transaction = fragmentManager.beginTransaction();
					transaction.replace(R.id.wokao1, new Myself_too());
					transaction.commit();
					a--;
				}

			}
		});

		// android.app.FragmentManager fragmentManager=getFragmentManager();
		// FragmentTransaction fragmentTransaction
		// =fragmentManager.beginTransaction();
		// fragmentTransaction.replace(R.id.wokao1, new Myself());
		return view;

	}

}
